import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/refund_reason_entity.dart';

RefundReasonEntity $RefundReasonEntityFromJson(Map<String, dynamic> json) {
	final RefundReasonEntity refundReasonEntity = RefundReasonEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		refundReasonEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		refundReasonEntity.msg = msg;
	}
	final List<RefundReasonData>? data = jsonConvert.convertListNotNull<RefundReasonData>(json['data']);
	if (data != null) {
		refundReasonEntity.data = data;
	}
	return refundReasonEntity;
}

Map<String, dynamic> $RefundReasonEntityToJson(RefundReasonEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	return data;
}

RefundReasonData $RefundReasonDataFromJson(Map<String, dynamic> json) {
	final RefundReasonData refundReasonData = RefundReasonData();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		refundReasonData.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		refundReasonData.title = title;
	}
	return refundReasonData;
}

Map<String, dynamic> $RefundReasonDataToJson(RefundReasonData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['title'] = entity.title;
	return data;
}